<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="css/common.css"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <script type="text/javascript" src="js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="js/jquery-2.1.3.min.js"></script>
</head>
<body>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a class="on" href="list.do">首页</a></li>
                <li><a href="${rc.contextPath}/" target="_blank">网站首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li><a href="#">管理员</a></li>
                <li><a href="#">修改密码</a></li>
                <li><a href="#">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <a href="#"><i class="icon-font">&#xe003;</i>常用操作</a>
                    <ul class="sub-menu">
                        <li><a href="upload.do"><i class="icon-font">&#xe008;</i>上传数据</a></li>
                        <li><a href="list.do"><i class="icon-font">&#xe005;</i>数据管理</a></li>
                        <li><a href="add.do"><i class="icon-font">&#xe006;</i>新增用户</a></li>
                        <li><a href="design.html"><i class="icon-font">&#xe004;</i>留言管理</a></li>
                        <li><a href="design.html"><i class="icon-font">&#xe012;</i>评论管理</a></li>
                        <li><a href="design.html"><i class="icon-font">&#xe052;</i>友情链接</a></li>
                        <li><a href="design.html"><i class="icon-font">&#xe033;</i>广告管理</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#"><i class="icon-font">&#xe018;</i>系统管理</a>
                    <ul class="sub-menu">
                        <li><a href="system.html"><i class="icon-font">&#xe017;</i>系统设置</a></li>
                        <li><a href="system.html"><i class="icon-font">&#xe037;</i>清理缓存</a></li>
                        <li><a href="system.html"><i class="icon-font">&#xe046;</i>数据备份</a></li>
                        <li><a href="system.html"><i class="icon-font">&#xe045;</i>数据还原</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">
        <div class="result-wrap">
            <div class="result-title">
                <h1></h1>
            </div>
             <div class="result-content">
             	 <table class="result-tab"  width="100%">
                        <tr>
                            <th width="20%">身份证号</th>
                            <th width="15%">公司名称</th>
                            <th width="15%">姓名</th>
                            <th width="15%">金额</th>
                            <th width="15%">次数</th>
                            <th width="20%">操作</th>
                        </tr>
                        <#list page.list as acc >
                        <tr>
                           <td><#if acc.idcard ??>${acc.idcard}</#if></td>
                           <td><#if acc.comanyname ??>${acc.comanyname}</#if></td>
                           <td><#if acc.name ??>${acc.name}</#if></td>
                           <td><#if acc.money ??>${acc.money}</#if></td>
                           <td><#if acc.count ??>${acc.count}</#if></td>
                           <td><a href="edit/${acc.idcard}.do">修改</a>&nbsp;&nbsp;<a title="${acc.idcard}.do" href="javascript:void(0)" class="delete">删除</a></td>
                        </tr>
                        </#list>
                    </table>
                    <#include "page.ftl">
             </div>
        </div>
    </div>
    <!--/main-->
</div>
<script type="text/javascript">
$(function(){
	$(".delete").click(function(){
		var url="delete/"+$(this).attr("title")
		if(confirm("是否要删除该条记录")){
			$.ajax({
				url:url,
				type:'post',
				dataType:'json',
				success:function(result){
					alert(result.msg);
					location.reload();
				},
				error:function(){
					alert("数据发生错误");
				}
				
			});
		}
	});
})
</script>
</body>
</html>